<!--包含头部文件-->

{include file="public/head" /}

<body>

<nav class="breadcrumb"><i class="Hui-iconfont">&#xe67f;</i> 首页 <span class="c-gray en">&gt;</span> 广告位管理<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a></nav>



<div class="page-container">

  <div class="text-c"> 

  <form method="get" action="">

      <div class="formControls col-xs-8 col-sm-3"> 

        <span class="select-box">

            <select name="type_id" class="select">



              <!-- 这段php代码就为了判定选定的当前状态，选了A栏目，最后应该是默认是A -->

                <?php

                  $type_id=input('get.type_id');

                ?>

                <option value="">全部</option>

                {volist name="typeData" id="vo"}

                  <option value="{$vo.id}"

                        {if condition="$vo.id eq $type_id"}

                  selected="" 

                  {/if}

                  >{$vo.name}</option>

                {/volist}

              

            </select>

        </span>

      </div>

      <div class="formControls col-xs-4 col-sm-1">

        <button type="submit" class="btn btn-success radius" id="" name=""><i class="Hui-iconfont">&#xe665;</i>搜索</button>

      </div>

    

  </form>

  </div>

  <br><br>



  <div class="cl pd-5 bg-1 bk-gray mt-20"> <span class="l"> <a class="btn btn-primary radius" href="{:url('ad/add')}"><i class="Hui-iconfont">&#xe600;</i> 添加</a></span> <span class="r"></span> </div>



  <div class="mt-20">

    <table class="table table-border table-bordered table-bg table-hover table-sort">

      <thead>

        <tr class="text-c">

          <th width="40">ID</th>

          <th width="150">标题</th>

          <th width="100">图片</th>

          <th width="150">所属分类</th>

          <th width="50">排序<br><span class="tishi" style="font-weight: normal;">数字越小越靠前</span></th>

          <th width="30">状态</th>

          <th width="30">操作</th>

        </tr>

      </thead>

      <tbody>

        {volist name="adData" id="vo"}

        <tr class="text-c">

          <td>{$vo.id}</td>

          <td>{$vo.title}</td>

          <td><img src="{$vo.thumb}" width="100"></td>

          <td>{$vo.name}</td>

          <td class="text-c listorder"><input size="10" attr-id="{$vo.id}" attr-model="ad" name="listorder" value="{$vo.listorder}"/></td>

          <td class="td-status status">

              

              {if condition="$vo.status eq 1"}

              <a href="{:url('base/status',array('id'=>$vo.id,'dbname'=>'ad','status'=>0))}"><span class='label label-success radius'>正常</span></a>

              {else/}

              <a href="{:url('base/status',array('id'=>$vo.id,'dbname'=>'ad','status'=>1))}"><span class='label label-danger radius'>停用</span></a>

              {/if}

          

          </td>

          <td class="td-manage"><a style="text-decoration:none" class="ml-5" href="{:url('ad/edit',array('id'=>$vo.id))}" title="修改"><i class="Hui-iconfont">&#xe6df;</i></a><a style="text-decoration:none" class="ml-5" onClick="o2o_del('{:url('ad/del', ['id'=>$vo.id])}')" href="javascript:;" title="删除"><i class="Hui-iconfont">&#xe6e2;</i></a></td>

        </tr>

      {/volist}

        

      </tbody>

    </table>

  </div>

  {$adData|raw}

</div>

<!--包含头部文件-->

{include file="public/foot" /}



